#include <iostream>
#include <iomanip>
#include <cstring>

int const maxn = 2007;
long long f[maxn][maxn];
long long k, w;

long long dp(long long k, long long w)
{
	if (w == 1) return (1 + k) * k / 2 + k;
	if (!k) return 0;
//	if (f[k][w]) return f[k][w];
	long long tmp = (1ll) << 44;
	int p = -1;
	for(int i = 1; i <= k; i++) {
		long long t = dp(i - 1, w - 1) + dp(k - i, w - 1) + k + 1;
		if (t < tmp) {
			p = i;
		}
		tmp = std::min(tmp, t);
	}
//	std::cerr << k << " " << w << "   " << p << "\n";
	return f[k][w] = tmp;
}

int main()
{
	while (std::cin >> k >> w) {
		memset(f, 0, sizeof(f));
		double ans = dp(k, w);
		ans /= k + 1;
		std::cout << std::fixed << std::setprecision(6) << ans << "\n";
	}
}

